<template>
	<view class="big_view">
		<view v-for="(item,index) in list" :key="index" class="for_view" @click="navroute(item)">
			<view class="top">{{item.title}}</view>
			<view class="bottom">{{item.publishTime}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		methods: {
			navroute(item) {
				console.log(item);
				uni.navigateTo({
					url: "/pages/component/newannouncementtwo/newannouncementtwo?item=" + encodeURIComponent(JSON
						.stringify(item.id))
				})
			},
			// 
			get_list() {
				uni.request({
					url: "http://111.67.198.176:8112/shop/notice/noticeList",
					method: "get",
					dataType: "json",
					success: (res) => {
						this.list = res.data.records
					}
				})
			}
		},
		onLoad() {
			this.get_list()
		}
	}
</script>

<style>
	.big_view {
		width: 100%;
	}

	.top {
		width: 100%;
	}

	.for_view {
		width: 95%;
		margin-top: 10px;
		margin-left: 3%;
		border-bottom: 1px solid #ccc;
	}

	.bottom {
		width: 100%;
		padding: 10px 10px;
		box-sizing: border-box;
		color: #ccc;
		display: flex;
		justify-content: flex-end;
	}
</style>
